﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected string sEmployeesList = string.Empty;
    protected LocalFunctions FUNC;
    protected string sTitle;

    protected DataTable DT;

    protected string sKeywords = string.Empty;
    protected string sDescription = string.Empty;


    protected void Page_Load(object sender, EventArgs e)
    {
        FUNC = ((ArtCube)this.Master).FUNC;

        sTitle = FUNC.GetPhrase(1);

        //Get page global data
        Dal.arParams.Clear();
        Dal.arParams.Add(5); // typeID - 1- Emoloyees
        DataTable DTPage = Dal.ExecuteDBsp("Admin_GetPageByID", Dal.arParams);

        // If not null - fill fields
        if (DTPage != null)
            if (DTPage.Rows.Count > 0)
            {
                DataRow Row = DTPage.Rows[0];

                this.Title= Row["PageTitle"].ToString();
                sKeywords= Row["Keywords"].ToString();
                sDescription= Row["Description"].ToString();

            }

        //Load pageData
        Dal.arParams.Clear();
        Dal.arParams.Add((int)((ArtCube)this.Master).FUNC.LangID); // Curent language
        DT = Dal.ExecuteDBsp("GetEmployees", Dal.arParams);
    }
}